/**
 * 结尾是否相同
 * @param source
 * @param target
 * @returns {boolean}
 */
function endsWith(source, target) {
  if (target == null || target == "" || source.length == 0 || target.length > source.length)
    return false;
  return source.substring(source.length - target.length) == target;
}

export {endsWith}
